dwc_otg: fix several potential crash sources
authorP33M <p33m@github.com>
Fri, 12 May 2017 11:24:00 +0000 (12:24 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Thu, 15 Feb 2018 17:37:49 +0000 (17:37 +0000)
commitfd5eba2769a828fc168d71595cf12f93d86181f1
tree790956b819a0ef832b798dfa044acfac0d99d674
parent85b6f828ae15fb9006baf2482a8b523da8e7b579
dwc_otg: fix several potential crash sources

On root port disconnect events, the host driver state is cleared and
in-progress host channels are forcibly stopped. This doesn't play
well with the FIQ running in the background, so:
- Guard the disconnect callback with both the host spinlock and FIQ
  spinlock
- Move qtd dereference in dwc_otg_handle_hc_fsm() after the early-out
  so we don't dereference a qtd that has gone away
- Turn catch-all BUG()s in dwc_otg_handle_hc_fsm() into warnings.
drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
drivers/usb/host/dwc_otg/dwc_otg_hcd.c
drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c